﻿/*==============================================================
 * PromoteMsgMapping.cs
 * Copyright (C) 2014 贵州惠众互联 Inc. All rights reserved.
 *==============================================================
 * Author:   罗应红
 * Date:     2014/02/17 10:26:12.
 * Version:  1.0
 * QQ:		 88962800
*==============================================================*/

using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using QDT.Core.Domain;

namespace QDT.Core.MSData.Mapping {
    public class PromoteMsgMapping:EntityTypeConfiguration<PromoteMsg> {
        public PromoteMsgMapping() {
            HasKey(o => o.ID);
            Property(o => o.ID).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("id");
            Ignore(o=>o.Type);
            Property(o => o.InnerMsgType).HasColumnName("type");
            Ignore(o=>o.SmsType);
            Property(o => o.InnerSmsType).HasColumnName("sms_type");
            Property(o => o.Title).HasColumnName("title");
            Property(o => o.Content).HasColumnName("content");
            Property(o => o.SendTime).HasColumnName("send_time");
            Ignore(o=>o.SendStatus);
            Property(o => o.InnerSendStatus).HasColumnName("send_status");
            Property(o => o.DealId).HasColumnName("deal_Id");
            Ignore(o=>o.SendType);
            Property(o => o.InnerSendType).HasColumnName("send_type");
            Property(o => o.SendTypeId).HasColumnName("send_type_id");
            Property(o => o.SendDefineData).HasColumnName("send_define_data");
            Property(o => o.IsHtml).HasColumnName("is_html");
            ToTable(DB.TPref("promote_msg"));
        }
    }
}